import { isJdCorrectType } from '/@/views/examination-audit/abnormal-teacher/index'


export function creterColumns() {
    return [
        {
            title: '级别',
            dataIndex: 'jb',
            key: 'jb',
            align: 'center',
            width: 60,
        },
        {
            title: '题号',
            dataIndex: 'tmbh',
            key: 'tmbh',
            align: 'center',
            width: 60,
        },
        {
            title: '题名',
            dataIndex: 'tmbt',
            key: 'tmbt',
            align: 'center',
            width: 100,
        },
        {
            title: '类型',
            dataIndex: 'tmlx',
            key: 'tmlx',
            align: 'center',
            width: 100,
            customRender: ({ record }) => {
                return isJdCorrectType(record) ? '客观题' : '主观题'
            },
        },
        {
            title: '满分',
            dataIndex: 'tmfz',
            key: 'tmfz',
            align: 'center',
            width: 60, customRender: ({ record }) => {
                return typeof record.tmfz == 'number' ? record.tmfz : '--'
            },
        },
        {
            title: '评阅已完成',
            dataIndex: 'pywc',
            key: 'pywc',
            align: 'center',
            width: 140,
        },
        {
            title: '评阅中',
            dataIndex: 'pyz',
            key: 'pyz',
            align: 'center',
            width: 140,
        },
        {
            title: '未评阅',
            dataIndex: 'wpy',
            key: 'wpy',
            align: 'center',
            width: 140,
        },
        {
            title: '平均分',
            dataIndex: 'pjf',
            key: 'pjf',
            align: 'center',
            width: 60,
            customRender: ({ record }) => {
                return typeof record.pjf == 'number' ? record.pjf : '--'
            },
        },
        {
            title: '最高分',
            dataIndex: 'zdf',
            key: 'zdf',
            align: 'center',
            width: 60, customRender: ({ record }) => {
                return typeof record.zdf == 'number' ? record.zdf : '--'
            },
        },
        {
            title: '最低分',
            dataIndex: 'zxf',
            key: 'zxf',
            align: 'center',
            width: 60, customRender: ({ record }) => {
                return typeof record.zxf == 'number' ? record.zxf : '--'
            },
        },
        {
            title: '标准分差',
            dataIndex: 'bzc',
            key: 'bzc',
            align: 'center',
            width: 60, customRender: ({ record }) => {
                return typeof record.bzc == 'number' ? record.bzc : '--'
            },
        },
        {
            title: '中位数',
            dataIndex: 'zws',
            key: 'zws',
            align: 'center',
            width: 60, customRender: ({ record }) => {
                return typeof record.zws == 'number' ? record.zws : '--'
            },
        },
        {
            title: '区分度',
            dataIndex: 'qfd',
            key: 'qfd',
            align: 'center',
            width: 60, customRender: ({ record }) => {
                return typeof record.qfd == 'number' ? record.qfd : '--'
            },
        },
        {
            title: '及格率',
            dataIndex: 'jgl',
            key: 'jgl',
            align: 'center',
            width: 60, customRender: ({ record }) => {
                return typeof record.jgl == 'number' ? `${(record.jgl * 100).toFixed(2)}%` : '--'
            },
        },
        {
            title: '得分率',
            dataIndex: 'dfl',
            key: 'dfl',
            align: 'center',
            width: 60, customRender: ({ record }) => {
                return typeof record.pjf == 'number' ? `${(record.pjf * 100 / (record.tmfz || 1)).toFixed(2)}%` : '--'
            },
        },
    ]
}


export const selectKmpyjdOption = [
    {
        value: "false",
        label: '试评阅阶段',
    },
    {
        value: "true",
        label: '正评阅阶段',
    },
]



export enum pymsEnum {
    pyMs_1 = '单评',
    pyMs_2 = '双评',
}







export const xDataList = [
    0,
    1,
    2,
    3,
    4,
    5,
    6,
    7,
    8,
    9,
    10,
    11,
    12,
    13,
    14,
    15,
    16,
    17,
    18,
    19,
    20,
    21,
    22,
    23,
    24,
    25,
    26,
    27,
    28,
    29,
    30,
    31,
    32,
    33,
    34,
    35,
    36,
    37,
    38,
    39,
    40,
    41,
    42,
    43,
    44,
    45,
    46,
    47,
    48,
    49,
    50,
    51,
    52,
    53,
    54,
    55,
    56,
    57,
    58,
    59,
    60,
    61,
    62,
    63,
    64,
    65,
    66,
    67,
    68,
    69,
    70,
    71,
    72,
    73,
    74,
    75,
    76,
    77,
    78,
    79,
    80,
    81,
    82,
    83,
    84,
    85,
    86,
    87,
    88,
    89,
    90,
    91,
    92,
    93,
    94,
    95,
    96,
    97,
    98,
    99,
    100
]